﻿@using MvcPaging
@model IPagedList<Classified.Domain.Entities.Page>
@{
    ViewBag.Title = "Pages List";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
<h1>
    List <small>of Pages</small></h1>
<p class="noprint">
    @Html.ActionLink("[+] Create New ", "Create", null, new { @class = "btn btn-info" })
</p>
<table class="table table-bordered table-striped">
    <thead>
        <th width="20%">
            Name
        </th>
        <th>
            Titile
        </th>
        <th>
            Created Date
        </th>
        <th >
            Active
        </th>
        <th >
        </th>
    </thead>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.CreatedOnUtc)
            </td>
            <td>
                @item.IsActive
            </td>
            <td>
                <a href="@Url.Action("Edit", "Page", new { id = item.Id })" class="btn btn-primary"><i class="icon-edit icon-white"></i> Edit</a>
                 <a href="@Url.Action("Delete", "Page", new { id = item.Id })" class="btn" onclick = "return confirm('Are you sure you wish to delete this Page?');" ><i class="icon-trash"></i> Delete</a>

                @* @Html.ActionLink("Edit", "Edit", "Page", new { id = item.Id }, new { idLocationDetails = item.Id, @class = "btn primary small editLocationDetails" })
                @Html.ActionLink("Delete", "Delete", "Page", new { id = item.Id }, new { @class = "btn small ", onclick = "return confirm('Are you sure you wish to delete this Page?');" })*@
            </td>
        </tr>
    }
</table>
<div class="pagingContainer noprint">
    @Html.Pager(Model.PageSize, Model.PageNumber, Model.TotalItemCount)
</div>
